<h1>{$content.movie.title} ({$content.movie.year})</h1>

{if $config.developer == 1}
<div class="info_box">
	<span class="title">Developer Tools</span>
	<ul>
	<li><a href="{$config.base_url}{$config.directory_imdb_cache}{$content.movie.imdb}.title">View cache file</a></li>
	</ul>
</div>
{/if}

<table cellpadding="3">
	<tr>
		<td>{if $content.image}<img align="left" src="{$config.base_url}{$config.directory_imdb_image}{$content.movie.image_name}" />{/if}</td>
		<td valign="top">
			{imdb url=$content.movie.imdb_url}<br /><br />
			<a href="index.php?what=movie&amp;do=update&amp;id={$content.movie.id}" title="Download the latest details from IMDB">Update Details</a>[Last Updated: {$content.movie.updated|date:$config.date_format_long}] [<a><s>Manual Update</s></a>]<br />
			{if $content.own == false}
				<a href="index.php?what=mymovies&amp;do=add&amp;id={$content.movie.id}">Add to collection</a><br />
			{else}
				This movie is currently in your collection!
				[
				<a href="index.php?what=mymovies&amp;do=remove&amp;id={$content.movie.id}">Remove</a> |
				<a href="index.php?what=mymovies&amp;do=edit&amp;id={$content.movie.id}">Edit Details</a>
				{if $content.own.incomplete}<img src="templates/{$config.smarty_template}/images/incomplete.png" alt="incomplete" />{/if} |
				<!--<a href="index.php?what=mymovies&amp;do=borrow&amp;id={$content.movie.id}">Mark as borrowed</a> |-->
				<a href="#" onclick="movie_list_add({$content.movie.id});">MARK</a> <a href="#"><img border="0" src="templates/{$config.smarty_template}/images/help.gif" /></a>
				]<br />
			{/if}
			{if $content.wishlist == false}<a href="index.php?what=wishlist&amp;do=add&amp;id={$content.movie.id}">Add to wishlist</a><br /><br />{elseif $content.own == false}This movie is currently in your wishlist! [<a href="index.php?what=wishlist&amp;do=remove&amp;id={$content.movie.id}">Remove</a>]<br />{/if}
			Views: {$content.movie.views}
		</td>
	</tr>
</table>

<strong>Genre:</strong>
{foreach from=$content.movie.genres item=g name=g}
	<a href="index.php?what=movie&amp;do=browse&amp;id={$g.id}">{$g.title}</a>
	{if $smarty.foreach.g.last == false} / {/if}
{/foreach}
<br /><br />

<strong>Tagline:</strong> {$content.movie.tagline}<br /><br />

<strong>Plot Outline:</strong> {$content.movie.plot}<br /><br />

{if $content.movie.also_known_as|@count > 0}
<strong>Also Known As:</strong><br />
{foreach from=$content.movie.also_known_as item=aka}{$aka}<br />{/foreach}
<br />
{/if}

{if $content.movie.directors}
<strong>Directed By</strong><br />
<table>
{foreach from=$content.movie.directors item=d}
<tr>
	<td>{imdb url=$d.imdb_url title=$d.credited}</td>
</tr>
{/foreach}
</table>
<br />
{/if}

{if $content.movie.writers}
<strong>Writing Credits</strong><br />
<table>
{foreach from=$content.movie.writers item=w}
<tr>
	<td>{imdb url=$w.imdb_url title=$w.credited} ({$w.role})</td>
</tr>
{/foreach}
</table>
<a href="{$content.movie.imdb_url}fullcredits#writers">More</a>
<br /><br />
{/if}

{if $content.movie.actors}
<strong>Cast Overview</strong><br />
<table>
{foreach from=$content.movie.actors item=a}
<tr>
	<td>{imdb url=$a.imdb_url title=$a.credited}</td>
	<td>...</td>
	<td>{$a.character}</td>
</tr>
{/foreach}
</table>
<a href="{$content.movie.imdb_url}fullcredits">More</a>
<br /><br />
{/if}


<strong>IMDB Rating:</strong> {$content.movie.imdb_rating}/10<br />
{if $config.ratings == 1}
	<strong>Current Rating:</strong> <span id="rating">0.00</span>/10
	(<span id="rating_votes"></span>)
	<span id="rating_box">Your Rating
		{section name="rating" start=1 loop=11}<a title="Set your vote to {$smarty.section.rating.iteration}" href="#" onclick="process_rating({$content.movie.id}, {$smarty.section.rating.iteration});"><img src="templates/{$config.smarty_template}/images/rating_100.png" alt="Set your vote to {$smarty.section.rating.iteration}" /></a>{/section}
	</span>
	<br />
	<script type="text/javascript" language="javascript">
		update_vote_results('{$content.movie.rating}|{$content.movie.rating_votes}|{$config.ratings_min_votes}');
		update_rating_img({$content.movie.member_vote});
	</script>
{/if}

<strong>Runtime:</strong> {$content.movie.runtime} Min<br />
<strong>Country:</strong><br />
<strong>Language:</strong><br />
<strong>Color:</strong><br /><br />

<h2 id="owners">Owners</h2>
{if $content.owners}
	<table cellspacing="0" cellpadding="5">
		<tr>
			<td>Name</td>
			<td>Email</td>
			<td>Medium</td>
			<td></td>
		</tr>
		{foreach from=$content.owners item=o}
		<tr bgcolor="{if $member.id == $o.id}#DFDFDF{/if}">
			<td>{$o.id}. <a href="index.php?what=members&amp;do=view&amp;id={$o.id}">{$o.username}</a></td>
			<td>{$o.email}</td>
			<td><strong>{$o.medium}</strong></td>
			<td>
				{if $member.id == $o.id}
					<i>[Your Copy]</i>
				{elseif $o.borrowed}
					<!--<span style="font-weight: bold;" title="{$o.username} currently has this title marked as borrowed.">[borrowed]</span>-->
				{else}
					<!--<a href="index.php?what=borrow&amp;do=request&amp;own_id={$o.own_id}">Send Request to borrow</a>-->
				{/if}
				<!--|--> <a href="index.php?what=movie&do=details&id={$content.movie.id}&member={$o.id}">View Details of this copy</a>
			</td>
		</tr>
		{/foreach}
	</table>
{else}
	No one owns this movie
{/if}

{if $config.comments}
	<h2 id="comments">Comments</h2>
	{if $content.comments}
		<dl class="comment">
		{foreach from=$content.comments item=c name=comment}
			<dd>
				{$smarty.foreach.comment.iteration}.
				{if $c.active}
					{$c.comment|nl2br}
					<span class="posted">Posted at {$c.created|date:$config.date_format_short} by <a href="index.php?what=members&amp;do=collection&amp;id={$c.member.id}">{$c.member.username}</a></span>
				{else}
					[Comment has been deleted by administrator]
				{/if}
			</dd>
		{/foreach}
		</dl>
	{else}
		There is currently no comments
	{/if}
	<form action="index.php" method="post" id="frm_comments">
	<input type="hidden" name="what" value="movie" />
	<input type="hidden" name="do" value="comment" />
	<input type="hidden" name="movie_id" value="{$content.movie.id}" />
	<div><strong>Name:</strong></div>
	<textarea name="comment" cols="60" rows="6"></textarea><br />
	<input type="submit" value="Post Comment &raquo;" />
	</form>
{/if}

<br /><br />
<strong>Movie Added:</strong> {$content.movie.created|date:$config.date_format_long}<br />
<strong>Last Updated From IMDB:</strong> {$content.movie.updated|date:$config.date_format_long}